package com.example.springbootlearn.netty.dto;


import lombok.Data;
import okhttp3.WebSocket;

@Data
public class WebSocketInfo {

    private WebSocket webSocket;

    private Boolean firstMessage;

    public WebSocketInfo(WebSocket webSocket) {
        this.webSocket = webSocket;
        this.firstMessage = true;
    }

    public void close() {
        webSocket.close(1000, "close");
    }
}
